//
//  DateUtil.m
//  cityStar
//
//  Created by wangjia on 15/3/31.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "DateUtil.h"

@implementation DateUtil
+ (NSString *)getTimeWithChuo:(long long)index{
    if (index < 0) {
        return @"";
    }
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:index];
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
    [dateFormatter setTimeZone:[NSTimeZone localTimeZone]];
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    NSString *dateAndTime =  [dateFormatter stringFromDate:date];
    return dateAndTime;
}
@end
